<template>
  <section>
    <el-row style="margin-top:40px;">
      <el-col :span="6">
        <span style="font-size: 28px;">饮食频率</span>
      </el-col>
      <el-col :span="18" style="border:1px solid #666;padding:5px;">
        <el-row style="border-bottom:1px solid #000">
          ◎饮食频率
        </el-row>
        <el-row style="font-weight: bold;border-bottom:1px dashed #000">
          <el-col :span="16">
            食物类型
          </el-col>
          <el-col :span="8">
            食用频率
          </el-col>
        </el-row>
        <el-row style="border-bottom:1px dashed #000" v-for="fc of widget.data.foodCategory" :key="fc.id">
          <el-col :span="16">
            {{fc.name}}({{fc.foodInstance}})
          </el-col>
          <el-col :span="8">
            {{fc.frequency}}
          </el-col>
        </el-row>
        <el-row>
          <div v-html="widget.config.description"></div>
        </el-row>
      </el-col>
    </el-row>
  </section>
</template>

<script>
  export default {
    name: "page-fangan-i",
    props: ['reportData','widget', 'showConfDialog'],
    created(){
      if(Object.getOwnPropertyNames(this.widget.data).length < 2){
        //选择频率
        this.widget.data.foodCategory = this.reportData.data.foodCategory
        this.$emit('done',this.widget.data)
      }
    }
  }
</script>

<style scoped>

</style>
